<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
</head>
<body>
    <header class="aui-bar aui-bar-nav" id="aui-header" style="background: linear-gradient(to right,#f370af 0,#5515ee 100%);">
        <a class="aui-btn aui-pull-left" tapmode onclick="closeWin()">
            <span class="aui-iconfont aui-icon-left" style="color:#FFF"></span>
        </a>
        <div id="title" class="aui-title">广告管理</div>
		
		        <a class="aui-btn aui-pull-right" tapmode onclick="addAd()">
            <span class="aui-iconfont aui-icon-plus" style="color:#FFF"></span>
        </a>
    </header> 
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript">
  apiready = function(){

    api.parseTapmode();
    var header = $api.byId('aui-header');
    $api.fixStatusBar(header);
    var headerPos = $api.offset(header);
    var body_h = $api.offset($api.dom('body')).h;
    api.openFrame({
        name: 'agent_ad_administration_frm',
        url: 'widget://html/agent_settings/agent_ad_administration_frm.html',
        bounces: false,
        rect: {
            x: 0,
            y: headerPos.h,
            w: 'auto',
            h: 'auto'
        },

        pageParam:{}
    })


  }


  function closeWin(){
      api.closeWin({
      });
  }
  
  
  
  
  
    
      function addAd(){


        api.openWin({
            name: 'agent_ad_add_win',
            url: 'widget://html/agent_settings/agent_ad_add_win.html', 
        });
		
		
	/*	
			//打开页面时 关闭当前页
		api.addEventListener({
         name:'viewdisappear'
     },function(){
         api.closeWin({
              name:api.winName
         });
     });
		
		
		*/
		
		
		

    }



</script>
</html>
